// sqlMap.js  sql语句
const sqlMap = {
	// -----------------黑马优购sql--------------------------
	getHomeBanners: 'select * from homebanners',
	getHomegoodsgift: 'select * from goodsgift',
	getHomegoodsgirl: 'select * from goodsgirl',
	getHomegoodssport: 'select * from goodssport',
	getGoodsDetail: 'select * from goodsdetail where goods_id=?',
	// 订单
	addOrderList: 'insert into orderList (goods_id,goods_small_logo,goods_name,goods_count,goods_price,goods_address,goods_if) values(?,?,?,?,?,?,?)',
	getOrderListChoose: 'select * from orderList where goods_state=?',
	getOrderList: 'select * from orderList',
	searchorderid: 'select * from orderlist where goods_id = ?',
	deleteorderList: 'delete from orderlist where goods_id =?',
	updateordrtListmessage: 'update orderlist set goods_state=?, goods_all=?,goods_address=?,goods_if=? where goods_id=?',
	updateordrtListstate: 'update orderlist set goods_state=? where goods_id=?',

	searchgoods: 'select * from goodsgirl where goods_name like ? union all select * from goodsgift where goods_name like ? union all select * from goodssport where goods_name like ?',
	showallgoods: 'select * from goodsdetail',
	changegoodsdetail: 'update goodsdetail set goods_name=?,goods_price=?,goods_kucun=?,goods_weight=?,goods_small_logo=?,goods_type=?,goods_pics=?,goods_introduce=? where goods_id=?',
	deletegoodsdetail: 'delete from goodsdetail where goods_id=?',
	addgoodsdetail: 'insert into goodsdetail (goods_id,goods_name,goods_price,goods_kucun,goods_weight,goods_small_logo,goods_type,goods_pics,goods_introduce) values(?,?,?,?,?,?,?,?,?)',
	addgoods: 'insert into goodsdetail (goods_id,goods_name,goods_price,goods_small_logo) values(?,?,?,?)',
	filtergoodsdetail: 'select * from goodsdetail where goods_type=?',
	searchgoodsdetail: 'select * from goodsdetail where goods_name like ?',


}

module.exports = sqlMap;